<div class="worker-info work-info-new main shadowbox"> 
  <form name="worker" role="form" novalidate>
    <div class="container-header">人员新增</div>
    <div class="info-vendor">
      <div class="info-items">
        <div class="info-title">
          <span class="title-brief">档案编号</span>
        </div>
        <div class="info-content">
          <div class="file-number">        
            <label><b>*</b>档案编号：</label>
            <input type="text" name="recordNo"
              ng-model="workerInfoDetailNew.editableUserInfo.recordNo" required/>
            <span class="archive-id-error-tip"
              ng-show="(worker.$submitted || worker.recordNo.$dirty) && worker.recordNo.$error.required">
              必填
            </span>     
          </div>
        </div>
      </div>
      <div class="info-items ">
        <div class="info-title">
          <span class="title-brief">基本信息</span>
        </div>
        <div class="base-info pa-form-content"> 
          <div class="row-fl fl">
            <div class="row-item">
              <div class="pa-form-control fl">
                <label for="name" class="fl"><b>*</b>姓名：</label>
                <div class="pa-input fl">
                  <input type="text" name="username" required
                    ng-model="workerInfoDetailNew.editableUserInfo.name"/>
                </div>
                <span class="mandatory"
                  ng-show="(worker.$submitted || worker.username.$dirty) && worker.username.$invalid">
                  必填
                </span>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl"><b>*</b>性别：</label>
                <div class="pa-input fl">
                  <input type="radio" class="sex-checkbox" name="gender" value="1" ng-model="workerInfoDetailNew.editableUserInfo.sex" required />男
                  <input type="radio" class="sex-checkbox" name="gender" value="0" ng-model="workerInfoDetailNew.editableUserInfo.sex" required />女
                </div>           
                <span class="mandatory mandatory-gender"
                  ng-show="(worker.$submitted || worker.gender.$dirty) && worker.gender.$error.required"
                  >
                  必填
                </span>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl"><b>*</b>身份证号：</label>
                <div class="pa-input fl">
                  <input type="text" name="idCard" 
                    ng-model="workerInfoDetailNew.editableUserInfo.idCard"  required/>
                </div>
                <span class="mandatory" 
                  ng-show="(worker.$submitted || worker.idCard.$dirty) && worker.idCard.$error.required">
                  必填
                </span>
              </div>
            </div>
            <div class="row-item">
              <div class="pa-form-control fl">
                <label for="name" class="fl">出生日期：</label>
                <div class="pa-input fl">
                  <input type="text" ng-datepicker
                    ng-model="workerInfoDetailNew.editableUserInfo.birthday"/>
                </div>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl">籍贯：</label>
                <div class="pa-input fl">
                  <input type="text" 
                    ng-model="workerInfoDetailNew.editableUserInfo.nativePlace" />
                </div>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl">婚姻状况：</label>
                <div class="pa-input fl">
                  <input type="radio" class="sex-checkbox" name="marriage" value="1" ng-model="workerInfoDetailNew.editableUserInfo.maritalStatus">是
                  <input type="radio" class="sex-checkbox" name="marriage" value="0" ng-model="workerInfoDetailNew.editableUserInfo.maritalStatus">否
                </div>
              </div>         
            </div>
            <div class="row-item">          
              <div class="pa-form-control fl">
                <label for="name" class="fl">政治面貌：</label>
                <div class="pa-input fl">
                  <input type="text"
                    ng-model="workerInfoDetailNew.editableUserInfo.politicsStatus" />
                </div>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl">学历：</label>
                <div class="pa-input fl">
                  <input type="text"
                    ng-model="workerInfoDetailNew.editableUserInfo.degree" />
                </div>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl">入党时间：</label>
                <div class="pa-input fl">
                  <input type="text" ng-datepicker
                    ng-model="workerInfoDetailNew.editableUserInfo.joinPartyTime" />
                </div>
              </div>
            </div>
            <div class="row-item">
              <div class="pa-form-control fl">
                <label for="name" class="fl"><b>*</b>岗位类别：</label>
                <div class="pa-input fl">
                  <select name="category" required
                    style="width: 100%;"
                    ng-model="workerInfoDetailNew.editableUserInfo.stationCategory">
                    <option value=""></option>
                    <option value="{{item.code}}"
                      ng-repeat ="item in workerInfoDetailNew.categoryList">
                      {{item.name}}
                    </option>
                  </select>
                </div>
                <span class="mandatory"
                  ng-show="(worker.$submitted || worker.category.$dirty) && worker.category.$error.required"
                  >必填</span>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl"><b>*</b>进场时间：</label>
                <div class="pa-input fl">
                  <input type="text" ng-datepicker
                    name="inTime" required
                    ng-model="workerInfoDetailNew.editableUserInfo.inTime" />
                </div>
                <span class="mandatory"
                  ng-show="(worker.$submitted || worker.inTime.$dirty) && worker.inTime.$error.required"
                  >必填</span>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl"><b>*</b>施工队：</label>
                <div class="pa-input fl">
                  <select id="type" name="type" style="width:100%;" 
                    ng-model="workerInfoDetailNew.editableUserInfo.constructionTeamId" required>
                    <option value=""></option>
                    <optgroup ng-repeat="teamGroup in workerInfoDetailNew.teamWithOrgList"
                      label="{{teamGroup.orgUnitName}}">
                      <option ng-repeat="team in teamGroup.teamList"
                        value="{{team.teamId}}">
                        {{team.teamName}}
                      </option>
                    </optgroup>
                  </select>
                </div>
                <span class="mandatory"
                  ng-show="(worker.$submitted || worker.type.$dirty) && worker.type.$error.required">
                  必填
                </span>
              </div>
            </div>
            <div class="row-item">
              <div class="pa-form-control fl">
                <label for="name" class="fl">上岗时间：</label>
                <div class="pa-input fl">
                  <input type="text" ng-datepicker
                    ng-model="workerInfoDetailNew.editableUserInfo.workTime" />
                </div>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl">联系方式：</label>
                <div class="pa-input fl">
                  <input type="text"
                    ng-model="workerInfoDetailNew.editableUserInfo.phone" />
                </div>
              </div>
              <div class="pa-form-control fl">
                <label for="name" class="fl"><b>*</b>进入单位时间：</label>
                <div class="pa-input fl">
                  <input type="text" name="enterTime" ng-datepicker
                    ng-model="workerInfoDetailNew.editableUserInfo.entryTime" 
                    required />
                </div>
                <span class="mandatory"
                  ng-show="(worker.$submitted || worker.enterTime.$dirty) && worker.enterTime.$error.required"
                  >
                  必填
                </span>
              </div>
            </div>
            <div class="row-item">
              <div class="pa-form-control pa-form-control-home fl">
                <label for="name" class="fl">家庭地址：</label>
                <div class="pa-input fl">
                  <input type="text"
                    ng-model="workerInfoDetailNew.editableUserInfo.homeAddress" />
                </div>
              </div>
            </div>
            <div class="row-item">
              <div class="pa-form-control fl">
                <label for="name" class="fl">是否特种人员：</label>
                <div class="name-gender">
                  <div class="pa-input fl">
                    <input type="radio" 
                      class="sex-checkbox" 
                      name="personnel" 
                      value="1" 
                      ng-model="workerInfoDetailNew.editableUserInfo.isspecialMan"  
                      ng-change="workerInfoDetailNew.isSpecial()">是
                    <input type="radio" 
                      class="sex-checkbox" 
                      name="personnel" 
                      value="0"
                      ng-model="workerInfoDetailNew.editableUserInfo.isspecialMan"
                      ng-change="workerInfoDetailNew.isSpecial()">否
                  </div>
                </div>
              </div>
              <div class="pa-form-control fl"
                ng-if="workerInfoDetailNew.isSpecialMandatory">
                <label for="name" class="fl">
                  <b>*</b>证书编号：</label>
                <div class="pa-input fl">
                  <input type="text" name="certyNo" required 
                    ng-model="workerInfoDetailNew.editableUserInfo.certificateNo" />
                </div>
                <span class="mandatory"
                  ng-show="(worker.$submitted || worker.certyNo.$dirty) && workerInfoDetailNew.isSpecialMandatory && worker.certyNo.$error.required"
                  >
                  必填
                </span>
              </div>
              <div class="pa-form-control fl"
                ng-if="workerInfoDetailNew.isSpecialMandatory">
                <label for="name" class="fl">
                  <b>*</b>发证部门：</label>
                <div class="pa-input fl">
                  <input type="text" name="numberDepartment" required
                    ng-model="workerInfoDetailNew.editableUserInfo.certificateDepartment"  />
                </div>
                <span class="mandatory"
                  ng-show="(worker.$submitted || worker.numberDepartment.$dirty) && workerInfoDetailNew.isSpecialMandatory && worker.numberDepartment.$error.required">
                  必填
                </span>
              </div> 
            </div>
            <div class="row-item">
              <div class="pa-form-control fl"
                ng-if="workerInfoDetailNew.isSpecialMandatory">
                <label for="name" class="fl">作业类别：</label>
                <div class="pa-input fl">
                  <select name="workType"
                    style="width: 140px;"
                    ng-model="workerInfoDetailNew.editableUserInfo.workType">
                    <option value=""></option>
                    <option value="{{item.code}}"
                      ng-repeat ="item in workerInfoDetailNew.workList">
                      {{item.name}}
                    </option>
                  </select>
                </div>
              </div>
              <div class="pa-form-control fl"
                ng-if="workerInfoDetailNew.isSpecialMandatory">
                <label for="name" class="fl">
                  <b>*</b>发证时间：</label>
                <div class="pa-input fl">
                  <input type="text" ng-datepicker name="certyTime" required
                    ng-model="workerInfoDetailNew.editableUserInfo.certificateTime" />
                </div>
                <span class="mandatory" 
                  ng-show="(worker.$submitted || worker.certyTime.$dirty) && workerInfoDetailNew.isSpecialMandatory && worker.certyTime.$error.required">
                  必填
                </span>
              </div>          
              <div class="pa-form-control fl"
                ng-if="workerInfoDetailNew.isSpecialMandatory">
                <label for="name" class="fl">
                  <b>*</b>下次复审时间：</label>
                <div class="pa-input fl">
                  <input type="text" ng-datepicker name="nextTime" required
                    ng-model="workerInfoDetailNew.editableUserInfo.nextReviewTime" />
                </div>
                <span class="mandatory" 
                  ng-show="workerInfoDetailNew.isSpecialMandatory && (worker.$submitted || worker.nextTime.$dirty) && worker.nextTime.$error.required">必填</span>
              </div>
            </div>
          </div>
          <div class="row-fr fr">
            <avatar-upload 
              component-id="cp1"
              pick-btn-id="avatar_picker"
              upload-url="{{fileUploadUrl.workerInfo}}"
              image-file="workerInfoDetailNew.editableUserInfo.imageFile">
            </avatar-upload>
            <avatar-attachment-upload
              component-id="cp2"
              pick-btn-id="avatar_attachment_picker"
              upload-url="{{fileUploadUrl.workerInfo}}"
              file-list="workerInfoDetailNew.editableUserInfo.fileBeanList">
            </avatar-attachment-upload>
          </div>           
        </div>
        <div class="btn-outer">
          <a class="pa-btn"            
            ng-click="workerInfoDetailNew.save(worker)">
            <i class="fa fa-save" ></i>
            <span class="ml5">保存</span>
          </a>
          <a class="pa-btn reset-btn"
            ng-click="workerInfoDetailNew.reset()">
            <i class="fa fa-repeat"></i>
            <span class="ml5">重置</span>
          </a>
        </div>
      </div>      
    </div>
  </form>
</div>
